﻿<!DOCTYPE html>
<!--法律法规更新-->
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
        <script src="/static/js/common.js"></script>

    <style>
        .redItem .el-form-item__label {
            width: 110px;
        }

        /*重写弹窗样式*/
        .el-dialog__body {
            height: 300px;
        }

        .el-dialog__body {
            height: 100% !important;
        }

        .el-dialog.is-fullscreen {
            overflow: hidden !important;
        }
    </style>
</head>

<body>

    <div id="Law" v-cloak>

        <el-form label-position="right" ref="form" :inline="true" :model="formInline" class="demo-form-inline"
                 style="margin-bottom: 15px;">
            <!--头部按钮-->
            <el-row type="flex" justify="end">
                <el-col class="head-tool">

                    <div class="new_title fl"><strong><img src="/static/images/icon1.png" />法律法规更新列表</strong></div>
                    <span>
                        <btn :text="col.btnSelect" imgsrc="/static/images/search.png" linetype="3" @click="onSubmit">
                        </btn>

                        <btn-export-list url="/api/FL_BasisInformation/Export" :forminline="this.formInline" linetype="3"></btn-export-list>
                        <btn :text="col.btnImport" imgsrc="/static/images/import.png" linetype="4" @click="FileInput">
                        </btn>
                        <!--<btn :text="col.btnUpLoad" imgsrc="/static/images/UpLoad.png" linetype="4" @click="BtnImport">
    </btn>-->
                       
                    </span>
                </el-col>
            </el-row>
            <!--头部文本框-->
            <el-row>
                <!--工厂组件-->
                <!--<list-factorys-all @change="factoryChange" v-model="formInline.model.createFactory"></list-factorys-all>-->
                <!--文件级别-->
                <el-col :xs="8" :sm="8" :md="8" :lg="6" :xl="6">
                    <div class="elst-select-mini">
                        <el-form-item>
                            <el-input size="mini">
                                <template slot="prepend">
                                    {{LawRegulationsTable.FileLeve+mark.m}}
                                </template>
                                <el-select @visible-change="visibleChange" v-model="formInline.model.FileLeve" :placeholder="LawRegulationsTable.FileLeve" slot="suffix">
                                    <el-option label="请选择" value=""></el-option>
                                    <el-option v-for="item in FileLevel" :label="item.fileLeve" :value="item.id">
                                    </el-option>
                                </el-select>

                            </el-input>
                        </el-form-item>
                    </div>
                </el-col>
                <!--法律法规名称-->
                <el-col :xs="8" :sm="8" :md="8" :lg="6" :xl="6">
                    <div class="elst-select-mini">
                        <el-form-item>
                            <el-input v-model="formInline.model.LawRegulationsName"
                                      :placeholder="LawRegulationsTable.LawRegulationsName" size="mini">
                                <template slot="prepend">
                                    {{LawRegulationsTable.LawRegulationsName+mark.m}}
                                </template>
                            </el-input>
                        </el-form-item>
                    </div>
                </el-col>
                <!--备注-->
                <el-col :xs="8" :sm="8" :md="8" :lg="6" :xl="6">
                    <div class="elst-select-mini">
                        <el-form-item>
                            <el-input v-model="formInline.model.Remarks" :placeholder="LawRegulationsTable.Remarks"
                                      size="mini">
                                <template slot="prepend">
                                    {{LawRegulationsTable.Remarks+mark.m}}
                                </template>
                            </el-input>
                        </el-form-item>
                    </div>
                </el-col>
            </el-row>
            <!--头部文本框结束-->
        </el-form>

        <!--下方表格-->
        <el-table stripe ref="table" :data="ListItem.tableData" :row-key="getRowKeys" :height="ListItem.tableHeight"
                  border @selection-change="handleSelectionChange" row-style="height:10px" style="width: 100%;">
            <!--复选框-->
            <!--<el-table-column type="selection" style=" padding-top: 0px; padding-bottom: 0px;" align="center" width="55" :reserve-selection="true">
    </el-table-column>-->
            <!--第一列-->
            <el-table-column type="index" :label="LawRegulationsTable.id" show-overflow-tooltip="true" width="50" :index="indexMethod"></el-table-column>

            <!--第二列-->
            <el-table-column prop="mark01" :label="LawRegulationsTable.FileLeve" show-overflow-tooltip="true"
                             min-width="180">
            </el-table-column>
            <!--第三列-->
            <el-table-column prop="lawRegulationsName" show-overflow-tooltip="true"
                             :label="LawRegulationsTable.LawRegulationsName" min-width="150">
            </el-table-column>
            <!--第四列-->
            <el-table-column prop="issueSubject" :label="LawRegulationsTable.IssueSubject" show-overflow-tooltip="true"
                             min-width="180">
            </el-table-column>
            <!--第五列-->
            <el-table-column prop="symbol" :label="LawRegulationsTable.Symbol" show-overflow-tooltip="true" min-width="120">

            </el-table-column>
            <!--第六列-->
            <el-table-column prop="issueDate" :label="LawRegulationsTable.IssueDate" show-overflow-tooltip="true"
                             min-width="180" :formatter="myformatDate">
            </el-table-column>
            <!--第七列-->
            <el-table-column prop="implementationDate" :label="LawRegulationsTable.ImplementationDate" show-overflow-tooltip="true" min-width="180" :formatter="myformatDate">
            </el-table-column>
            <!--第八列-->
            <el-table-column prop="uploadDate" :label="LawRegulationsTable.UploadDate" show-overflow-tooltip="true" min-width="180" :formatter="myformatDate">
            </el-table-column>
            <!--第九列-->
            <el-table-column prop="remarks" :label="LawRegulationsTable.Remarks" show-overflow-tooltip="true" min-width="120">

            </el-table-column>
        </el-table>
        <!--表格结束-->
        <!--分页开始-->
        <el-row type="flex" justify="end">


            <el-pagination ref="page" @size-change="handleSizeChange" @current-change="handleCurrentChange"
                           :current-page="ListItem.currentPage" :page-sizes="ListItem.pagesizes" :page-size="ListItem.pagesize"
                           :layout="ListItem.layout" :total="ListItem.total">
            </el-pagination>

        </el-row>
        <!--分页结束-->
        <!--上传界面开始-->
        <!--弹出框--#注释#-->
        <el-dialog title="法律法规更新" :visible.sync="ListItem.dialogVisible" @close='closeDialog' width="80%" height="80%"
                   top="10vh" fullscreen="true">
            <iframe ref="iframe" :src="ListItem.InputUrl" style="height:95%;width:100%" frameborder="0"></iframe>
        </el-dialog>
    </div>

    <script>
        var app = new Vue({
            el: '#Law',
            data: {
                ImportAreaId: null,
                ImportDialog: false,
                ListItem: ListItem,
                //获取下拉菜单--文件级别
                FileLevel: [],
                formInline: {
                    model: { FileLevel: '', LawRegulationsName: '' },
                    offset: 0,
                    limit: 10
                },
            },
            mounted: function () {
                this.GetPageData(1);
                //初始化数据
               // this.GetPageData(1);
                //列表高度自适应
                tablehigh(this);
                //获取下拉菜单内容
               this.GetLevelData();
            },
            methods: {
                //解決edge下select bug
                visibleChange: function (isVisible) {
                    visibleChange(isVisible)
                },
                //factoryChange: function () {
                //    //var aa = this.formInline.model.createFactory;
                    
                //},
                indexMethod: function (index) {
                    return (this.ListItem.currentPage - 1) * this.ListItem.pagesize + index + 1;
                },
                //Dialog展示
                BtnImport: function (val, id) { DialogShow(this, val, "LawRegulationsUpdateInput.html", id); },
                //关闭Dialog 回调
                closeDialog: function () { closeDialog(this); },
                //获取分页数据
                GetPageData: function (currentIndex) {
                    GetPageData(this, currentIndex, '/api/FL_BasisInformation/GetList')
                },
                //查询实现方法
                onSubmit: function () { onSubmit(this); },
                //跳页触发方法
                handleCurrentChange: function (val) { handleCurrentChange(this, val); },
                //列表选择触发
                handleSelectionChange: function (val) { handleSelectionChange(this, val); },
                //pagesize改变 触发方法
                handleSizeChange: function (val) { handleSizeChange(this, val); },
                //获取下拉菜单数据
                getDropDown: function () {
                },
                //文件导入实现
                FileInput: function (val, id) { DialogShow(this, val, "LawRegulationsImport.html", id); },
                //导出--暂时此提示--之后跟官标实现
                FileExcel: function () {
                    myAjax("post", this, '/api/FL_StandardInformationWeb/Export', null,
                        function (response) {
                            console.log(response);
                            if (response.result == "Success") {
                                showMessage(response.message, 'success');
                            }
                            else {
                                showMessage(response.message, 'fail');
                            }

                        });
                },
                GetLevelData: function () {
                    var mythis = this;
                    myAjax("post", mythis, '/api/FL_FileLevel/GetList', { model: {}, offset: 0, limit: 10 }, function (response) {
                        mythis.FileLevel = response.data.pageData
                    });
                },
            },
        });
    </script>


</body>

</html>